import request from '@/utils/request'

export default {
    getList: function (data) {
      return request({
        url: '/device/listByPage',
        method: 'post',
        data
      })
    },
    getLifeList: function (data) {
        return request({
          url: '/device/getLifeList',
          method: 'post',
          data
        })
      },
    getType: function () {
        return request({
          url: '/device/getType',
          method: 'get'
        })
      },
      getHouseList: function(){
        return request({
          url: '/storeHouse/getHouseList',
          method: 'get',
        })
      },
      save: function(data){
        return request({
          url: '/device/save',
          method: 'post',
          data
        })
      },
      changeStatus: function(id){
        return request({
          url: '/device/changeStatus/'+id,
          method: 'get'
        })
      },
      remove: function(id){
        return request({
          url: '/device/remove/'+id,
          method: 'get'
        })
      },
      update: function(data){
        return request({
          url: '/device/update',
          method: 'post',
          data
        })
      },
      clearLife: function(id){
        return request({
          url: '/device/clearLife/'+id,
          method: 'get'
        })
      }
  }